import request from "@/utils/request"

//确认待办
export const forceTodeal = params => {
	return request({
		url: "/erp/todeal",
		method: "put",
		data: params
	})
}


export const partlist = params => {
	return request({
		url: "/erp/repairMaterialPart/list1",
		method: "get",
		params
	})
}

// 缺件零件列表
export const partNum = params => {
	return request({
		url: "/erp/repairMaterialPart/partNum",
		method: "get",
		params
	})
}

//查询返修单产品列列表
export const repairOrderProductList = () => {
	return request({
		url: "/erp/homeController/list1",
		method: "get"
	})
}

//产品完成量统计
export const completedAmount = params => {
	return request({
		url: "/erp/homeController/yearProduct",
		method: "get",
		params
	})
}

//产品退修量统计
export const revision = params => {
	return request({
		url: "/erp/homeController/yearProductRetreat",
		method: "get",
		params
	})
}

//年返修完成量统计
export const annualRepair = params => {
	return request({
		url: "/erp/homeController/yearRepair",
		method: "get",
		params
	})
}

//军检不合格量统计
export const unqualified = params => {
	return request({
		url: "/erp/homeController/disqualification1",
		method: "get",
		params
	})
}

//军检合格量统计
export const qualified = params => {
	return request({
		url: "/erp/homeController/qualified1",
		method: "get",
		params
	})
}

//返修单完成量
export const repairOrderComplete = params => {
	return request({
		url: "/erp/homeController/monthProduct",
		method: "get",
		params
	})
}

//产品完成量
export const productCompletionQuantity = params => {
	return request({
		url: "/erp/homeController/monthRepair",
		method: "get",
		params
	})
}

//在线产品统计
export const onlineProducts = params => {
	return request({
		url: "/erp/homeController/onlineProduct1",
		method: "get",
		params
	})
}
//超期未交付统计
export const undelivered = params => {
	return request({
		url: "/erp/homeController/overdueDelivery1",
		method: "get",
		params
	})
}

//未下料统计
export const unpacked = params => {
	return request({
		url: "/erp/homeController/uncut1",
		method: "get",
		params
	})
}
//未下发文件统计
export const fileNotIssued = params => {
	return request({
		url: "/erp/homeController/unissuedFile1",
		method: "get",
		params
	})
}
//未发货统计
export const unshipped = params => {
	return request({
		url: "/erp/homeController/unshipped1",
		method: "get",
		params
	})
}

//军检待提交
export const militaryInspection = params => {
	return request({
		url: "/erp/homeController/militaryInspection1",
		method: "get",
		params
	})
}

//查询用户消息列表
export const getMessage = query => {
	return request({
		url: "/erp/notice/list",
		method: "get",
		params: query
	})
}

//查询用户消息列表
export const changeMessageStatus = params => {
	return request({
		url: "/erp/notice",
		method: "put",
		data: params
	})
}

//查询待办任务列表
export const getTodoList = () => {
	return request({
		url: "/erp/todeal/list",
		method: "get"
	})
}

//查询待办数量
export const getTodoNum = () => {
	return request({
		url: "/erp/todeal/count",
		method: "get"
	})
}

//查询未读消息数量
export const getMsgNum = () => {
	return request({
		url: "/erp/notice/count",
		method: "get"
	})
}

// ======================================数据看板2================================================================

//送检产品数量
export const getSJCP = params => {
	return request({
		url: "/erp/homeController/sj1",
		method: "get",
		params
	})
}
//送检主机轮数量
export const getZJL = params => {
	return request({
		url: "/erp/homeController/sj2",
		method: "get",
		params
	})
}
//送检前机轮数量
export const getQJL = params => {
	return request({
		url: "/erp/homeController/sj3",
		method: "get",
		params
	})
}
//送检刹车装置数量
export const getSC = params => {
	return request({
		url: "/erp/homeController/sj4",
		method: "get",
		params
	})
}
//送检其它数量
export const getQT = params => {
	return request({
		url: "/erp/homeController/sj5",
		method: "get",
		params
	})
}

// =======================================

//翻修数量
export const getFX = params => {
	return request({
		url: "/erp/homeController/fx1",
		method: "get",
		params
	})
}

//检修数量
export const getJX = params => {
	return request({
		url: "/erp/homeController/jx1",
		method: "get",
		params
	})
}

//贮存超期数量
export const getCCCQ = params => {
	return request({
		url: "/erp/homeController/cccq1",
		method: "get",
		params
	})
}

// =======================================

//完成产品数量
export const getWCCP = params => {
	return request({
		url: "/erp/homeController/wc1",
		method: "get",
		params
	})
}
//完成主机轮数量
export const getWCZJL = params => {
	return request({
		url: "/erp/homeController/wc2",
		method: "get",
		params
	})
}
//完成前机轮数量
export const getWCQJL = params => {
	return request({
		url: "/erp/homeController/wc3",
		method: "get",
		params
	})
}
//完成刹车装置数量
export const getWCSC = params => {
	return request({
		url: "/erp/homeController/wc4",
		method: "get",
		params
	})
}
//完成其它数量
export const getWCQT = params => {
	return request({
		url: "/erp/homeController/wc5",
		method: "get",
		params
	})
}

// =======================================
//年流转数量
export const getLZSJ = params => {
	return request({
		url: "/erp/homeController/lzs1",
		method: "get",
		params
	})
}

//合格率
export const getPassRateData = params => {
	return request({
		url: "/erp/homeController/percentPass",
		method: "get",
		params
	})
}

//客户类型
export const getCustomerTypeData = params => {
	return request({
		url: "/erp/homeController/customerRatio",
		method: "get",
		params
	})
}

// ----------------------------------------------------------------
// 地图
export const listProvinceCustomer = (query) => {
  return request({
    url: '/erp/homeController/provinceCustomer',
    method: 'get',
    params: query
  })
}
// 查询年度维修量列表
export const yearMaintenance = (query) => {
  return request({
    url: '/erp/homeController/yearMaintenance',
    method: 'get',
    params: query
  })
}
// 查询年度完成率列表
export const yearPercentage = (query) => {
  return request({
    url: '/erp/homeController/yearPercentage',
    method: 'get',
    params: query
  })
}


// 查询公司资质证书列表
export const qualificationList = (query) => {
  return request({
    url: '/erp/homeController/qualificationList',
    method: 'get',
    params: query
  })
}


